﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System.Xml.Serialization;

namespace Zombie_Demo.User_Interface
{
     [Serializable]
     [XmlRoot("Frame")]
     [XmlInclude(typeof(Element))]
     public class Frame : Element
     {
          /// <summary>
          /// Create a new frame, no parent.
          /// </summary>
          public Frame()
               : base()
          {
               this.Parent = null;
               this.name = "UI";
          }

          /// <summary>
          /// Create a new frame with the given parent.
          /// </summary>
          /// <param name="parent">The parent this frame will be assiged to.</param>
          public Frame(Element parent)
               : base(parent)
          {
              this.name = Parent.Name + "Frame";
          }

          public Frame(Element parent, string name)
              : base(parent)
          {
              this.name = Parent.Name + name;
          }

          public Frame(Vector2 position)
               : base()
          {
               this.Position = position;
               this.Parent = null;
               this.name = "UI";
          }

          public Frame(Vector2 position, Element parent)
              : base(parent, position)
          {
              this.Parent = null;
              this.name = "UI";
          }

          public Frame(Element parent, string name, Vector2 position)
              : base(parent, position)
          {
              this.name = Parent.Name + name;
          }

          public Frame(Element parent, string name, Rectangle bounds)
              : base(parent, bounds)
          {
              this.name = Parent.Name + name;
          }
     }
}
